/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import eos.moe.armourers.SkinRenderHelper;
/*     */ import java.awt.Color;
/*     */ import java.awt.Graphics2D;
/*     */ import java.awt.RenderingHints;
/*     */ import java.awt.image.BufferedImage;
/*     */ import java.util.List;
/*     */ import java.util.Locale;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.texture.DynamicTexture;
/*     */ import net.minecraft.client.renderer.texture.ITextureObject;
/*     */ import net.minecraft.client.renderer.texture.TextureManager;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import org.yaml.snakeyamla.configuration.ConfigurationSection;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class eo
/*     */   extends pi
/*     */ {
/*     */   public bh qa;
/*     */   public bh na;
/*     */   public bh ea;
/*     */   public bh ka;
/*     */   public bh xa;
/*     */   private bh aa;
/*     */   private bh ta;
/*     */   private bh c;
/*     */   private bh r;
/*     */   private bh z;
/*     */   private bh i;
/*     */   private bh w;
/*     */   private ko q;
/*     */   private String g;
/*     */   
/*     */   public eo(vh vh1, ConfigurationSection configurationSection) {
/*  43 */     super(vh1, configurationSection);
/*  44 */     this.xa = createMoLangParserString("color", "255,255,255,255");
/*  45 */     this.aa = createMoLangParserString("text", "");
/*  46 */     this.ta = createMoLangParserString("texture", "");
/*  47 */     this.c = createMoLangParserString("textureHovered", "");
/*  48 */     this.r = createMoLangParserString("font", "");
/*  49 */     this.z = createMoLangParserString("stencil", "");
/*     */     
/*  51 */     this.i = createMoLangParser("stencilWidth", Integer.valueOf(0));
/*  52 */     this.w = createMoLangParser("stencilHeight", Integer.valueOf(0));
/*     */     
/*  54 */     this.qa = createMoLangParser("u", Integer.valueOf(0));
/*  55 */     this.na = createMoLangParser("v", Integer.valueOf(0));
/*  56 */     Object object1 = readYml("textureWidth", null);
/*  57 */     if (object1 == null) {
/*  58 */       this.ea = this.p;
/*     */     } else {
/*  60 */       this.ea = createMoLangParser("textureWidth", Integer.valueOf(0));
/*     */     } 
/*  62 */     Object object2 = readYml("textureHeight", null);
/*  63 */     if (object2 == null) {
/*  64 */       this.ka = this.n;
/*     */     } else {
/*  66 */       this.ka = createMoLangParser("textureHeight", Integer.valueOf(0));
/*     */     } 
/*     */   }
/*     */   
/*     */   public void render(int i, int j) {
/*  71 */     boolean bool = isHovered(i, j);
/*     */     
/*  73 */     String str1 = this.c.v();
/*  74 */     String str2 = this.ta.v();
/*  75 */     String str3 = this.z.v();
/*  76 */     double d1 = this.ea.v();
/*  77 */     double d2 = this.ka.v();
/*  78 */     double d3 = this.p.v();
/*  79 */     double d4 = this.n.v();
/*  80 */     double d5 = this.qa.v();
/*  81 */     double d6 = this.na.v();
/*     */ 
/*     */     
/*  84 */     String str4 = (bool && !str1.isEmpty()) ? str1 : str2;
/*     */     
/*  86 */     if (str4.startsWith("skin|")) {
/*  87 */       if (nm.q) {
/*  88 */         GlStateManager.func_179129_p();
/*  89 */         SkinRenderHelper.renderSkin(str4.substring(5), (float)(d3 / 2.0D), (float)(d4 / 2.0D), (float)d3, (float)d4);
/*  90 */         GlStateManager.func_179089_o();
/*     */       } 
/*     */     } else {
/*     */       
/*  94 */       if (!str3.isEmpty()) {
/*  95 */         if (!str3.contains(".")) {
/*  96 */           v(str3);
/*     */         }
/*  98 */         double d8 = this.i.v();
/*  99 */         double d9 = this.w.v();
/* 100 */         d8 = (d8 == 0.0D) ? d3 : d8;
/* 101 */         d9 = (d9 == 0.0D) ? d4 : d9;
/* 102 */         ad.z(str3, d8, d9);
/*     */       } 
/*     */       
/* 105 */       Color color1 = jo.v(str4);
/* 106 */       if (str4.endsWith(".mp4")) {
/* 107 */         if (this.q == null || !str4.equals(this.g)) {
/* 108 */           this.g = str4;
/* 109 */           closeMedia();
/* 110 */           this.q = new ko();
/* 111 */           zf.w.v(this.q, str4);
/*     */         } 
/*     */         
/* 114 */         if (this.q.z()) {
/* 115 */           this.q.z(0.0D, 0.0D, d5, d6, d3, d4, d1, d2);
/*     */         }
/* 117 */       } else if (color1 == null) {
/* 118 */         hw.v(str4);
/* 119 */         jo.v(0.0D, 0.0D, d5, d6, d3, d4, d1, d2);
/*     */       } else {
/* 121 */         jo.v(0.0D, 0.0D, d3, d4, color1);
/*     */       } 
/* 123 */       if (!str3.isEmpty()) {
/* 124 */         ad.z();
/* 125 */         ad.v();
/*     */       } 
/*     */     } 
/*     */ 
/*     */     
/* 130 */     String str5 = this.r.v();
/* 131 */     List<String> list = sk.v(this.aa.v(), 0, str5);
/* 132 */     double d7 = d4 / 2.0D - ((list.size() == 1) ? 4.5D : (((list.size() - 1) * 5) + 4.5D));
/*     */     
/* 134 */     Color color = jo.v(this.xa.v());
/* 135 */     int k = (color == null) ? -1 : jo.v(color);
/*     */     
/* 137 */     for (int m = 0; m < list.size(); m++) {
/* 138 */       af.v(list.get(m), str5, d3 / 2.0D, d7 + (m * 10), true, true, true, k);
/*     */     }
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void cache(int i, int j) {
/* 213 */     super.cache(i, j);
/* 214 */     this.qa.z();
/* 215 */     this.na.z();
/* 216 */     this.ea.z();
/* 217 */     this.ka.z();
/* 218 */     this.xa.z();
/* 219 */     this.aa.z();
/* 220 */     this.ta.z();
/* 221 */     this.c.z();
/* 222 */     this.r.z();
/* 223 */     this.z.z();
/* 224 */     this.w.z();
/* 225 */     this.i.z();
/*     */   }
/*     */   
/*     */   public void setValue(String str, Object object) {
/*     */     String str1;
/* 230 */     switch (str.toLowerCase(Locale.ROOT)) {
/*     */       case "texture":
/* 232 */         this.ta = toMolangParser((String)object);
/*     */         return;
/*     */       case "texturehovered":
/*     */       case "texturehovred":
/* 236 */         this.c = toMolangParser((String)object);
/*     */         return;
/*     */       case "texturewidth":
/* 239 */         this.ea = toMolangParser(object);
/*     */         return;
/*     */       case "textureheight":
/* 242 */         this.ka = toMolangParser(object);
/*     */         return;
/*     */       case "u":
/* 245 */         this.qa = toMolangParser(object);
/*     */         return;
/*     */       case "v":
/* 248 */         this.na = toMolangParser(object);
/*     */         return;
/*     */       case "text":
/* 251 */         str1 = ((String)object).replace("\\n", "\n");
/* 252 */         this.aa = toMolangParser(str1);
/*     */         return;
/*     */       case "color":
/* 255 */         this.xa = toMolangParser((String)object);
/*     */         return;
/*     */       case "font":
/* 258 */         this.r = toMolangParser((String)object);
/*     */         return;
/*     */       case "stencil":
/* 261 */         this.z = toMolangParser((String)object);
/*     */         return;
/*     */       case "stencilwidth":
/* 264 */         this.i = toMolangParser(object);
/*     */         return;
/*     */       case "stencilheight":
/* 267 */         this.w = toMolangParser(object);
/*     */         return;
/*     */     } 
/* 270 */     super.setValue(str, object); } public Object getValue(String str) {
/*     */     String str1;
/*     */     Color color1;
/*     */     String str2;
/*     */     Color color2;
/* 275 */     switch (str.toLowerCase(Locale.ROOT)) {
/*     */       case "type_":
/*     */       case "type":
/* 278 */         return "texture";
/*     */       case "texture":
/* 280 */         str1 = this.ta.z();
/* 281 */         color1 = jo.v(str1);
/* 282 */         if (color1 != null) {
/* 283 */           return String.format("%d,%d,%d,%d", new Object[] { Integer.valueOf(color1.getRed()), Integer.valueOf(color1.getGreen()), Integer.valueOf(color1.getBlue()), Integer.valueOf(color1.getAlpha()) });
/*     */         }
/* 285 */         return this.ta.z();
/*     */       
/*     */       case "texturehovered":
/*     */       case "texturehovred":
/* 289 */         str2 = this.c.z();
/* 290 */         color2 = jo.v(str2);
/* 291 */         if (color2 != null) {
/* 292 */           return String.format("%d,%d,%d,%d", new Object[] { Integer.valueOf(color2.getRed()), Integer.valueOf(color2.getGreen()), Integer.valueOf(color2.getBlue()), Integer.valueOf(color2.getAlpha()) });
/*     */         }
/* 294 */         return this.c.z();
/*     */       
/*     */       case "texturewidth":
/* 297 */         return this.ea.z();
/*     */       case "textureheight":
/* 299 */         return this.ka.z();
/*     */       case "u":
/* 301 */         return this.qa.z();
/*     */       case "v":
/* 303 */         return this.na.z();
/*     */       case "text":
/* 305 */         return this.aa.z();
/*     */       case "color":
/* 307 */         return this.xa.z();
/*     */       case "font":
/* 309 */         return this.r.z();
/*     */       case "stencil":
/* 311 */         return this.z.z();
/*     */       case "stencilwidth":
/* 313 */         return this.i.z();
/*     */       case "stencilheight":
/* 315 */         return this.w.z();
/*     */ 
/*     */       
/*     */       case "texture_":
/* 319 */         return this.ta.h();
/*     */       case "texturehovered_":
/*     */       case "texturehovred_":
/* 322 */         return this.c.h();
/*     */       case "texturewidth_":
/* 324 */         return this.ea.h();
/*     */       case "textureheight_":
/* 326 */         return this.ka.h();
/*     */       case "u_":
/* 328 */         return this.qa.h();
/*     */       case "v_":
/* 330 */         return this.na.h();
/*     */       case "text_":
/* 332 */         return this.aa.h();
/*     */       case "color_":
/* 334 */         return this.xa.h();
/*     */       case "font_":
/* 336 */         return this.r.h();
/*     */       case "stencil_":
/* 338 */         return this.z.h();
/*     */       case "stencilwidth_":
/* 340 */         return this.i.h();
/*     */       case "stencilheight_":
/* 342 */         return this.w.h();
/*     */     } 
/*     */     
/* 345 */     return super.getValue(str);
/*     */   }
/*     */ 
/*     */   
/*     */   public void close() {
/* 350 */     super.close();
/* 351 */     closeMedia();
/*     */   }
/*     */   
/*     */   public void closeMedia() {
/* 355 */     if (this.q != null) {
/* 356 */       this.q.v();
/* 357 */       this.q = null;
/* 358 */       System.gc();
/*     */     } 
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\eo.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */